﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ModelProject
{
    public interface ISql
    {
        /// <summary>
        /// Execute specific query.
        /// </summary>
        /// <example>
        /// SELECT CreatedOn, DispatchedOn, From, Subject, Body, MailReadOn FROM dbo.[EmailDispatchOrder] WHERE EMailDispatcheId = {0}
        /// </example>
        IEnumerable<T> ExecuteQuery<T>(string sqlQuery, params object[] parameters);

        /// <summary>
        /// Execute command.
        /// </summary>
        /// <example>
        /// EXEC dbo.pub_CalculateEnvironmentalRiskForSurvey {0}, {1}
        /// </example>
        int ExecuteCommand(string sqlCommand, params object[] parameters);
    }
}
